Integrand size = 29, antiderivative size = 160 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2 \sin ^{1+n}(c+d x)}{d (1+n)}+\frac {2 a^2 \sin ^{2+n}(c+d x)}{d (2+n)}-\frac {a^2 \sin ^{3+n}(c+d x)}{d (3+n)}-\frac {4 a^2 \sin ^{4+n}(c+d x)}{d (4+n)}-\frac {a^2 \sin ^{5+n}(c+d x)}{d (5+n)}+\frac {2 a^2 \sin ^{6+n}(c+d x)}{d (6+n)}+\frac {a^2 \sin ^{7+n}(c+d x)}{d (7+n)} \]
a^2*sin(d*x+c)^(1+n)/d/(1+n)+2*a^2*sin(d*x+c)^(2+n)/d/(2+n)-a^2*sin(d*x+c) ^(3+n)/d/(3+n)-4*a^2*sin(d*x+c)^(4+n)/d/(4+n)-a^2*sin(d*x+c)^(5+n)/d/(5+n) +2*a^2*sin(d*x+c)^(6+n)/d/(6+n)+a^2*sin(d*x+c)^(7+n)/d/(7+n)
Time = 0.29 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.69 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2 \sin ^{1+n}(c+d x) \left (\frac {1}{1+n}+\frac {2 \sin (c+d x)}{2+n}-\frac {\sin ^2(c+d x)}{3+n}-\frac {4 \sin ^3(c+d x)}{4+n}-\frac {\sin ^4(c+d x)}{5+n}+\frac {2 \sin ^5(c+d x)}{6+n}+\frac {\sin ^6(c+d x)}{7+n}\right )}{d} \]
(a^2*Sin[c + d*x]^(1 + n)*((1 + n)^(-1) + (2*Sin[c + d*x])/(2 + n) - Sin[c + d*x]^2/(3 + n) - (4*Sin[c + d*x]^3)/(4 + n) - Sin[c + d*x]^4/(5 + n) + (2*Sin[c + d*x]^5)/(6 + n) + Sin[c + d*x]^6/(7 + n)))/d
Time = 0.39 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.91, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {3042, 3315, 99, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \cos ^5(c+d x) (a \sin (c+d x)+a)^2 \sin ^n(c+d x) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x)^5 (a \sin (c+d x)+a)^2 \sin (c+d x)^ndx\) |
\(\Big \downarrow \) 3315 |
\(\displaystyle \frac {\int \sin ^n(c+d x) (a-a \sin (c+d x))^2 (\sin (c+d x) a+a)^4d(a \sin (c+d x))}{a^5 d}\) |
\(\Big \downarrow \) 99 |
\(\displaystyle \frac {\int \left (a^6 \sin ^n(c+d x)+2 a^6 \sin ^{n+1}(c+d x)-a^6 \sin ^{n+2}(c+d x)-4 a^6 \sin ^{n+3}(c+d x)-a^6 \sin ^{n+4}(c+d x)+2 a^6 \sin ^{n+5}(c+d x)+a^6 \sin ^{n+6}(c+d x)\right )d(a \sin (c+d x))}{a^5 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {a^7 \sin ^{n+1}(c+d x)}{n+1}+\frac {2 a^7 \sin ^{n+2}(c+d x)}{n+2}-\frac {a^7 \sin ^{n+3}(c+d x)}{n+3}-\frac {4 a^7 \sin ^{n+4}(c+d x)}{n+4}-\frac {a^7 \sin ^{n+5}(c+d x)}{n+5}+\frac {2 a^7 \sin ^{n+6}(c+d x)}{n+6}+\frac {a^7 \sin ^{n+7}(c+d x)}{n+7}}{a^5 d}\) |
((a^7*Sin[c + d*x]^(1 + n))/(1 + n) + (2*a^7*Sin[c + d*x]^(2 + n))/(2 + n) - (a^7*Sin[c + d*x]^(3 + n))/(3 + n) - (4*a^7*Sin[c + d*x]^(4 + n))/(4 + n) - (a^7*Sin[c + d*x]^(5 + n))/(5 + n) + (2*a^7*Sin[c + d*x]^(6 + n))/(6 + n) + (a^7*Sin[c + d*x]^(7 + n))/(7 + n))/(a^5*d)
3.6.66.3.1 Defintions of rubi rules used
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) )^(p_), x_] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] && (IntegerQ[p] | | (GtQ[m, 0] && GeQ[n, -1]))
Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_ .)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b^p* f) Subst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2)*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, c, d, m, n}, x] && Intege rQ[(p - 1)/2] && EqQ[a^2 - b^2, 0]
Time = 6.87 (sec) , antiderivative size = 215, normalized size of antiderivative = 1.34
method | result | size |
derivativedivides | \(\frac {a^{2} \sin \left (d x +c \right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (1+n \right )}+\frac {a^{2} \left (\sin ^{7}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (7+n \right )}+\frac {2 a^{2} \left (\sin ^{2}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (2+n \right )}-\frac {a^{2} \left (\sin ^{3}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (3+n \right )}-\frac {4 a^{2} \left (\sin ^{4}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (4+n \right )}-\frac {a^{2} \left (\sin ^{5}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (5+n \right )}+\frac {2 a^{2} \left (\sin ^{6}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (6+n \right )}\) | \(215\) |
default | \(\frac {a^{2} \sin \left (d x +c \right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (1+n \right )}+\frac {a^{2} \left (\sin ^{7}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (7+n \right )}+\frac {2 a^{2} \left (\sin ^{2}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (2+n \right )}-\frac {a^{2} \left (\sin ^{3}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (3+n \right )}-\frac {4 a^{2} \left (\sin ^{4}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (4+n \right )}-\frac {a^{2} \left (\sin ^{5}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (5+n \right )}+\frac {2 a^{2} \left (\sin ^{6}\left (d x +c \right )\right ) {\mathrm e}^{n \ln \left (\sin \left (d x +c \right )\right )}}{d \left (6+n \right )}\) | \(215\) |
parallelrisch | \(\frac {15 \left (\sin ^{n}\left (d x +c \right )\right ) \left (\frac {4 \left (7+n \right ) \left (5+n \right ) \left (3+n \right ) \left (1+n \right ) \left (n^{2}+6 n -120\right ) \cos \left (2 d x +2 c \right )}{15}-\frac {8 \left (n +12\right ) \left (7+n \right ) \left (5+n \right ) \left (3+n \right ) \left (2+n \right ) \left (1+n \right ) \cos \left (4 d x +4 c \right )}{15}-\frac {4 \left (7+n \right ) \left (5+n \right ) \left (4+n \right ) \left (3+n \right ) \left (2+n \right ) \left (1+n \right ) \cos \left (6 d x +6 c \right )}{15}+\left (1+n \right ) \left (6+n \right ) \left (2+n \right ) \left (n^{2}+\frac {224}{15} n +\frac {133}{3}\right ) \left (4+n \right ) \sin \left (3 d x +3 c \right )+\frac {\left (1+n \right ) \left (6+n \right ) \left (2+n \right ) \left (n +\frac {7}{3}\right ) \left (4+n \right ) \left (3+n \right ) \sin \left (5 d x +5 c \right )}{5}-\frac {\left (6+n \right ) \left (5+n \right ) \left (4+n \right ) \left (3+n \right ) \left (2+n \right ) \left (1+n \right ) \sin \left (7 d x +7 c \right )}{15}+\frac {11 \left (6+n \right ) \left (2+n \right ) \left (n^{3}+\frac {211}{11} n^{2}+\frac {1853}{11} n +\frac {4725}{11}\right ) \left (4+n \right ) \sin \left (d x +c \right )}{15}+\frac {8 \left (7+n \right ) \left (5+n \right ) \left (3+n \right ) \left (1+n \right ) \left (n^{2}+14 n +88\right )}{15}\right ) a^{2}}{64 \left (7+n \right ) \left (n^{3}+12 n^{2}+44 n +48\right ) d \left (n^{3}+9 n^{2}+23 n +15\right )}\) | \(282\) |
a^2/d/(1+n)*sin(d*x+c)*exp(n*ln(sin(d*x+c)))+a^2/d/(7+n)*sin(d*x+c)^7*exp( n*ln(sin(d*x+c)))+2*a^2/d/(2+n)*sin(d*x+c)^2*exp(n*ln(sin(d*x+c)))-a^2/d/( 3+n)*sin(d*x+c)^3*exp(n*ln(sin(d*x+c)))-4*a^2/d/(4+n)*sin(d*x+c)^4*exp(n*l n(sin(d*x+c)))-a^2/d/(5+n)*sin(d*x+c)^5*exp(n*ln(sin(d*x+c)))+2*a^2/d/(6+n )*sin(d*x+c)^6*exp(n*ln(sin(d*x+c)))
Leaf count of result is larger than twice the leaf count of optimal. 473 vs. \(2 (160) = 320\).
Time = 0.29 (sec) , antiderivative size = 473, normalized size of antiderivative = 2.96 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=-\frac {{\left (2 \, {\left (a^{2} n^{6} + 22 \, a^{2} n^{5} + 190 \, a^{2} n^{4} + 820 \, a^{2} n^{3} + 1849 \, a^{2} n^{2} + 2038 \, a^{2} n + 840 \, a^{2}\right )} \cos \left (d x + c\right )^{6} - 16 \, a^{2} n^{4} - 256 \, a^{2} n^{3} - 2 \, {\left (a^{2} n^{6} + 18 \, a^{2} n^{5} + 118 \, a^{2} n^{4} + 348 \, a^{2} n^{3} + 457 \, a^{2} n^{2} + 210 \, a^{2} n\right )} \cos \left (d x + c\right )^{4} - 1376 \, a^{2} n^{2} - 2816 \, a^{2} n - 8 \, {\left (a^{2} n^{5} + 16 \, a^{2} n^{4} + 86 \, a^{2} n^{3} + 176 \, a^{2} n^{2} + 105 \, a^{2} n\right )} \cos \left (d x + c\right )^{2} - 1680 \, a^{2} + {\left ({\left (a^{2} n^{6} + 21 \, a^{2} n^{5} + 175 \, a^{2} n^{4} + 735 \, a^{2} n^{3} + 1624 \, a^{2} n^{2} + 1764 \, a^{2} n + 720 \, a^{2}\right )} \cos \left (d x + c\right )^{6} - 16 \, a^{2} n^{4} - 256 \, a^{2} n^{3} - 2 \, {\left (a^{2} n^{6} + 20 \, a^{2} n^{5} + 159 \, a^{2} n^{4} + 640 \, a^{2} n^{3} + 1364 \, a^{2} n^{2} + 1440 \, a^{2} n + 576 \, a^{2}\right )} \cos \left (d x + c\right )^{4} - 1472 \, a^{2} n^{2} - 3584 \, a^{2} n - 8 \, {\left (a^{2} n^{5} + 17 \, a^{2} n^{4} + 108 \, a^{2} n^{3} + 316 \, a^{2} n^{2} + 416 \, a^{2} n + 192 \, a^{2}\right )} \cos \left (d x + c\right )^{2} - 3072 \, a^{2}\right )} \sin \left (d x + c\right )\right )} \sin \left (d x + c\right )^{n}}{d n^{7} + 28 \, d n^{6} + 322 \, d n^{5} + 1960 \, d n^{4} + 6769 \, d n^{3} + 13132 \, d n^{2} + 13068 \, d n + 5040 \, d} \]
-(2*(a^2*n^6 + 22*a^2*n^5 + 190*a^2*n^4 + 820*a^2*n^3 + 1849*a^2*n^2 + 203 8*a^2*n + 840*a^2)*cos(d*x + c)^6 - 16*a^2*n^4 - 256*a^2*n^3 - 2*(a^2*n^6 + 18*a^2*n^5 + 118*a^2*n^4 + 348*a^2*n^3 + 457*a^2*n^2 + 210*a^2*n)*cos(d* x + c)^4 - 1376*a^2*n^2 - 2816*a^2*n - 8*(a^2*n^5 + 16*a^2*n^4 + 86*a^2*n^ 3 + 176*a^2*n^2 + 105*a^2*n)*cos(d*x + c)^2 - 1680*a^2 + ((a^2*n^6 + 21*a^ 2*n^5 + 175*a^2*n^4 + 735*a^2*n^3 + 1624*a^2*n^2 + 1764*a^2*n + 720*a^2)*c os(d*x + c)^6 - 16*a^2*n^4 - 256*a^2*n^3 - 2*(a^2*n^6 + 20*a^2*n^5 + 159*a ^2*n^4 + 640*a^2*n^3 + 1364*a^2*n^2 + 1440*a^2*n + 576*a^2)*cos(d*x + c)^4 - 1472*a^2*n^2 - 3584*a^2*n - 8*(a^2*n^5 + 17*a^2*n^4 + 108*a^2*n^3 + 316 *a^2*n^2 + 416*a^2*n + 192*a^2)*cos(d*x + c)^2 - 3072*a^2)*sin(d*x + c))*s in(d*x + c)^n/(d*n^7 + 28*d*n^6 + 322*d*n^5 + 1960*d*n^4 + 6769*d*n^3 + 13 132*d*n^2 + 13068*d*n + 5040*d)
Leaf count of result is larger than twice the leaf count of optimal. 14997 vs. \(2 (134) = 268\).
Time = 15.66 (sec) , antiderivative size = 14997, normalized size of antiderivative = 93.73 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=\text {Too large to display} \]
Piecewise((x*(a*sin(c) + a)**2*sin(c)**n*cos(c)**5, Eq(d, 0)), (a**2*log(s in(c + d*x))/d - 16*a**2/(15*d*sin(c + d*x)) + a**2*cos(c + d*x)**2/(2*d*s in(c + d*x)**2) - a**2/(6*d*sin(c + d*x)**2) + 8*a**2*cos(c + d*x)**2/(15* d*sin(c + d*x)**3) - a**2*cos(c + d*x)**4/(4*d*sin(c + d*x)**4) + a**2*cos (c + d*x)**2/(6*d*sin(c + d*x)**4) - 2*a**2*cos(c + d*x)**4/(5*d*sin(c + d *x)**5) - a**2*cos(c + d*x)**4/(6*d*sin(c + d*x)**6), Eq(n, -7)), (2*a**2* log(sin(c + d*x))/d + 8*a**2*sin(c + d*x)/(3*d) + 4*a**2*cos(c + d*x)**2/( 3*d*sin(c + d*x)) - 8*a**2/(15*d*sin(c + d*x)) + a**2*cos(c + d*x)**2/(d*s in(c + d*x)**2) - a**2*cos(c + d*x)**4/(3*d*sin(c + d*x)**3) + 4*a**2*cos( c + d*x)**2/(15*d*sin(c + d*x)**3) - a**2*cos(c + d*x)**4/(2*d*sin(c + d*x )**4) - a**2*cos(c + d*x)**4/(5*d*sin(c + d*x)**5), Eq(n, -6)), (192*a**2* log(tan(c/2 + d*x/2)**2 + 1)*tan(c/2 + d*x/2)**8/(192*d*tan(c/2 + d*x/2)** 8 + 384*d*tan(c/2 + d*x/2)**6 + 192*d*tan(c/2 + d*x/2)**4) + 384*a**2*log( tan(c/2 + d*x/2)**2 + 1)*tan(c/2 + d*x/2)**6/(192*d*tan(c/2 + d*x/2)**8 + 384*d*tan(c/2 + d*x/2)**6 + 192*d*tan(c/2 + d*x/2)**4) + 192*a**2*log(tan( c/2 + d*x/2)**2 + 1)*tan(c/2 + d*x/2)**4/(192*d*tan(c/2 + d*x/2)**8 + 384* d*tan(c/2 + d*x/2)**6 + 192*d*tan(c/2 + d*x/2)**4) - 192*a**2*log(tan(c/2 + d*x/2))*tan(c/2 + d*x/2)**8/(192*d*tan(c/2 + d*x/2)**8 + 384*d*tan(c/2 + d*x/2)**6 + 192*d*tan(c/2 + d*x/2)**4) - 384*a**2*log(tan(c/2 + d*x/2))*t an(c/2 + d*x/2)**6/(192*d*tan(c/2 + d*x/2)**8 + 384*d*tan(c/2 + d*x/2)*...
Time = 0.22 (sec) , antiderivative size = 143, normalized size of antiderivative = 0.89 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {\frac {a^{2} \sin \left (d x + c\right )^{n + 7}}{n + 7} + \frac {2 \, a^{2} \sin \left (d x + c\right )^{n + 6}}{n + 6} - \frac {a^{2} \sin \left (d x + c\right )^{n + 5}}{n + 5} - \frac {4 \, a^{2} \sin \left (d x + c\right )^{n + 4}}{n + 4} - \frac {a^{2} \sin \left (d x + c\right )^{n + 3}}{n + 3} + \frac {2 \, a^{2} \sin \left (d x + c\right )^{n + 2}}{n + 2} + \frac {a^{2} \sin \left (d x + c\right )^{n + 1}}{n + 1}}{d} \]
(a^2*sin(d*x + c)^(n + 7)/(n + 7) + 2*a^2*sin(d*x + c)^(n + 6)/(n + 6) - a ^2*sin(d*x + c)^(n + 5)/(n + 5) - 4*a^2*sin(d*x + c)^(n + 4)/(n + 4) - a^2 *sin(d*x + c)^(n + 3)/(n + 3) + 2*a^2*sin(d*x + c)^(n + 2)/(n + 2) + a^2*s in(d*x + c)^(n + 1)/(n + 1))/d
Leaf count of result is larger than twice the leaf count of optimal. 576 vs. \(2 (160) = 320\).
Time = 0.49 (sec) , antiderivative size = 576, normalized size of antiderivative = 3.60 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {\frac {{\left (n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{7} + 8 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{7} - 2 \, n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{5} + 15 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{7} - 20 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{5} + n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{3} - 42 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{5} + 12 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{3} + 35 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{3}\right )} a^{2}}{n^{3} + 15 \, n^{2} + 71 \, n + 105} + \frac {2 \, {\left (n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{6} + 6 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{6} - 2 \, n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{4} + 8 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{6} - 16 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{4} + n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{2} - 24 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{4} + 10 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{2} + 24 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{2}\right )} a^{2}}{n^{3} + 12 \, n^{2} + 44 \, n + 48} + \frac {{\left (n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{5} + 4 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{5} - 2 \, n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{3} + 3 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{5} - 12 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{3} + n^{2} \sin \left (d x + c\right )^{n} \sin \left (d x + c\right ) - 10 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )^{3} + 8 \, n \sin \left (d x + c\right )^{n} \sin \left (d x + c\right ) + 15 \, \sin \left (d x + c\right )^{n} \sin \left (d x + c\right )\right )} a^{2}}{n^{3} + 9 \, n^{2} + 23 \, n + 15}}{d} \]
((n^2*sin(d*x + c)^n*sin(d*x + c)^7 + 8*n*sin(d*x + c)^n*sin(d*x + c)^7 - 2*n^2*sin(d*x + c)^n*sin(d*x + c)^5 + 15*sin(d*x + c)^n*sin(d*x + c)^7 - 2 0*n*sin(d*x + c)^n*sin(d*x + c)^5 + n^2*sin(d*x + c)^n*sin(d*x + c)^3 - 42 *sin(d*x + c)^n*sin(d*x + c)^5 + 12*n*sin(d*x + c)^n*sin(d*x + c)^3 + 35*s in(d*x + c)^n*sin(d*x + c)^3)*a^2/(n^3 + 15*n^2 + 71*n + 105) + 2*(n^2*sin (d*x + c)^n*sin(d*x + c)^6 + 6*n*sin(d*x + c)^n*sin(d*x + c)^6 - 2*n^2*sin (d*x + c)^n*sin(d*x + c)^4 + 8*sin(d*x + c)^n*sin(d*x + c)^6 - 16*n*sin(d* x + c)^n*sin(d*x + c)^4 + n^2*sin(d*x + c)^n*sin(d*x + c)^2 - 24*sin(d*x + c)^n*sin(d*x + c)^4 + 10*n*sin(d*x + c)^n*sin(d*x + c)^2 + 24*sin(d*x + c )^n*sin(d*x + c)^2)*a^2/(n^3 + 12*n^2 + 44*n + 48) + (n^2*sin(d*x + c)^n*s in(d*x + c)^5 + 4*n*sin(d*x + c)^n*sin(d*x + c)^5 - 2*n^2*sin(d*x + c)^n*s in(d*x + c)^3 + 3*sin(d*x + c)^n*sin(d*x + c)^5 - 12*n*sin(d*x + c)^n*sin( d*x + c)^3 + n^2*sin(d*x + c)^n*sin(d*x + c) - 10*sin(d*x + c)^n*sin(d*x + c)^3 + 8*n*sin(d*x + c)^n*sin(d*x + c) + 15*sin(d*x + c)^n*sin(d*x + c))* a^2/(n^3 + 9*n^2 + 23*n + 15))/d
Time = 18.00 (sec) , antiderivative size = 819, normalized size of antiderivative = 5.12 \[ \int \cos ^5(c+d x) \sin ^n(c+d x) (a+a \sin (c+d x))^2 \, dx=\frac {a^2\,{\sin \left (c+d\,x\right )}^n\,\left (n^6\,1{}\mathrm {i}+n^5\,30{}\mathrm {i}+n^4\,398{}\mathrm {i}+n^3\,2788{}\mathrm {i}+n^2\,10137{}\mathrm {i}+n\,16958{}\mathrm {i}+9240{}\mathrm {i}\right )}{8\,d\,\left (n^7\,1{}\mathrm {i}+n^6\,28{}\mathrm {i}+n^5\,322{}\mathrm {i}+n^4\,1960{}\mathrm {i}+n^3\,6769{}\mathrm {i}+n^2\,13132{}\mathrm {i}+n\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}-\frac {a^2\,{\sin \left (c+d\,x\right )}^n\,\sin \left (7\,c+7\,d\,x\right )\,\left (n^6+21\,n^5+175\,n^4+735\,n^3+1624\,n^2+1764\,n+720\right )\,1{}\mathrm {i}}{64\,d\,\left (n^7\,1{}\mathrm {i}+n^6\,28{}\mathrm {i}+n^5\,322{}\mathrm {i}+n^4\,1960{}\mathrm {i}+n^3\,6769{}\mathrm {i}+n^2\,13132{}\mathrm {i}+n\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}+\frac {a^2\,\sin \left (c+d\,x\right )\,{\sin \left (c+d\,x\right )}^n\,\left (11\,n^6+343\,n^5+4869\,n^4+36773\,n^3+148360\,n^2+296844\,n+226800\right )\,1{}\mathrm {i}}{64\,d\,\left (n^7\,1{}\mathrm {i}+n^6\,28{}\mathrm {i}+n^5\,322{}\mathrm {i}+n^4\,1960{}\mathrm {i}+n^3\,6769{}\mathrm {i}+n^2\,13132{}\mathrm {i}+n\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}-\frac {a^2\,{\sin \left (c+d\,x\right )}^n\,\cos \left (6\,c+6\,d\,x\right )\,\left (n^6\,1{}\mathrm {i}+n^5\,22{}\mathrm {i}+n^4\,190{}\mathrm {i}+n^3\,820{}\mathrm {i}+n^2\,1849{}\mathrm {i}+n\,2038{}\mathrm {i}+840{}\mathrm {i}\right )}{16\,d\,\left (n^7\,1{}\mathrm {i}+n^6\,28{}\mathrm {i}+n^5\,322{}\mathrm {i}+n^4\,1960{}\mathrm {i}+n^3\,6769{}\mathrm {i}+n^2\,13132{}\mathrm {i}+n\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}-\frac {a^2\,{\sin \left (c+d\,x\right )}^n\,\cos \left (4\,c+4\,d\,x\right )\,\left (n^6\,1{}\mathrm {i}+n^5\,30{}\mathrm {i}+n^4\,334{}\mathrm {i}+n^3\,1764{}\mathrm {i}+n^2\,4633{}\mathrm {i}+n\,5694{}\mathrm {i}+2520{}\mathrm {i}\right )}{8\,d\,\left (n^7\,1{}\mathrm {i}+n^6\,28{}\mathrm {i}+n^5\,322{}\mathrm {i}+n^4\,1960{}\mathrm {i}+n^3\,6769{}\mathrm {i}+n^2\,13132{}\mathrm {i}+n\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}-\frac {a^2\,{\sin \left (c+d\,x\right )}^n\,\cos \left (2\,c+2\,d\,x\right )\,\left (-n^6\,1{}\mathrm {i}-n^5\,22{}\mathrm {i}-n^4\,62{}\mathrm {i}+n^3\,1228{}\mathrm {i}+n^2\,9159{}\mathrm {i}+n\,20490{}\mathrm {i}+12600{}\mathrm {i}\right )}{16\,d\,\left (n^7\,1{}\mathrm {i}+n^6\,28{}\mathrm {i}+n^5\,322{}\mathrm {i}+n^4\,1960{}\mathrm {i}+n^3\,6769{}\mathrm {i}+n^2\,13132{}\mathrm {i}+n\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}+\frac {a^2\,{\sin \left (c+d\,x\right )}^n\,\sin \left (5\,c+5\,d\,x\right )\,\left (3\,n^6+55\,n^5+397\,n^4+1445\,n^3+2792\,n^2+2700\,n+1008\right )\,1{}\mathrm {i}}{64\,d\,\left (n^7\,1{}\mathrm {i}+n^6\,28{}\mathrm {i}+n^5\,322{}\mathrm {i}+n^4\,1960{}\mathrm {i}+n^3\,6769{}\mathrm {i}+n^2\,13132{}\mathrm {i}+n\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )}+\frac {a^2\,{\sin \left (c+d\,x\right )}^n\,\sin \left (3\,c+3\,d\,x\right )\,\left (15\,n^6+419\,n^5+4417\,n^4+22569\,n^3+58568\,n^2+71932\,n+31920\right )\,1{}\mathrm {i}}{64\,d\,\left (n^7\,1{}\mathrm {i}+n^6\,28{}\mathrm {i}+n^5\,322{}\mathrm {i}+n^4\,1960{}\mathrm {i}+n^3\,6769{}\mathrm {i}+n^2\,13132{}\mathrm {i}+n\,13068{}\mathrm {i}+5040{}\mathrm {i}\right )} \]
(a^2*sin(c + d*x)^n*(n*16958i + n^2*10137i + n^3*2788i + n^4*398i + n^5*30 i + n^6*1i + 9240i))/(8*d*(n*13068i + n^2*13132i + n^3*6769i + n^4*1960i + n^5*322i + n^6*28i + n^7*1i + 5040i)) - (a^2*sin(c + d*x)^n*sin(7*c + 7*d *x)*(1764*n + 1624*n^2 + 735*n^3 + 175*n^4 + 21*n^5 + n^6 + 720)*1i)/(64*d *(n*13068i + n^2*13132i + n^3*6769i + n^4*1960i + n^5*322i + n^6*28i + n^7 *1i + 5040i)) + (a^2*sin(c + d*x)*sin(c + d*x)^n*(296844*n + 148360*n^2 + 36773*n^3 + 4869*n^4 + 343*n^5 + 11*n^6 + 226800)*1i)/(64*d*(n*13068i + n^ 2*13132i + n^3*6769i + n^4*1960i + n^5*322i + n^6*28i + n^7*1i + 5040i)) - (a^2*sin(c + d*x)^n*cos(6*c + 6*d*x)*(n*2038i + n^2*1849i + n^3*820i + n^ 4*190i + n^5*22i + n^6*1i + 840i))/(16*d*(n*13068i + n^2*13132i + n^3*6769 i + n^4*1960i + n^5*322i + n^6*28i + n^7*1i + 5040i)) - (a^2*sin(c + d*x)^ n*cos(4*c + 4*d*x)*(n*5694i + n^2*4633i + n^3*1764i + n^4*334i + n^5*30i + n^6*1i + 2520i))/(8*d*(n*13068i + n^2*13132i + n^3*6769i + n^4*1960i + n^ 5*322i + n^6*28i + n^7*1i + 5040i)) - (a^2*sin(c + d*x)^n*cos(2*c + 2*d*x) *(n*20490i + n^2*9159i + n^3*1228i - n^4*62i - n^5*22i - n^6*1i + 12600i)) /(16*d*(n*13068i + n^2*13132i + n^3*6769i + n^4*1960i + n^5*322i + n^6*28i + n^7*1i + 5040i)) + (a^2*sin(c + d*x)^n*sin(5*c + 5*d*x)*(2700*n + 2792* n^2 + 1445*n^3 + 397*n^4 + 55*n^5 + 3*n^6 + 1008)*1i)/(64*d*(n*13068i + n^ 2*13132i + n^3*6769i + n^4*1960i + n^5*322i + n^6*28i + n^7*1i + 5040i)) + (a^2*sin(c + d*x)^n*sin(3*c + 3*d*x)*(71932*n + 58568*n^2 + 22569*n^3 ...